package ai.people.netmon.framework.exception.enums;

/**
 * 信源异常类
 *
 * @author zhenglin
 * @since 2022/3/25
 */
public enum SourceExceptionEnum implements ExceptionEnum {
    /**
     * 源不存在
     */
    SOURCE_NOT_EXISTS(false, 400000, "信源不存在"),
    SOURCE_EXISTS(false, 400001, "信源已存在"),
    INVALID_PLATFORM(false, 400002, "无效的平台")
    ;

    /**
     * 状态
     */
    final boolean status;
    /**
     * 代码
     */
    final int code;
    /**
     * 消息
     */
    final String message;

    SourceExceptionEnum(boolean status, int code, String message) {
        this.status = status;
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }

    @Override
    public boolean getStatus() {
        return false;
    }
}
